﻿// Inner Fire 游戏引擎库
// PhysicsBoneSetting - 动态服装/骨骼配置
//
// Copyright (c) 2025 by 尔西大帝. All rights reserved.
//
// 所属层级：应用层（4）
// 动态服装/骨骼。用于配置不同形态的参数。比如头发，胸部，衣服，裙子等等。
//
// Author: 尔西大帝
// Email: 2670613871@qq.com
// Created: 2025-06-19

#pragma once

#include <EASTL/vector.h>
#include <element.h>
#include <game/config/config_info.h>
#include <xml_reader.h>

namespace ifire::game {
class ConfigManager;

class PhysicsBoneSetting : public ConfigInfo {
public:
  PhysicsBoneSetting(ConfigManager* manager, const ikit::XmlNode& node);
  PhysicsBoneSetting(const PhysicsBoneSetting& lhs) = delete;
  PhysicsBoneSetting& operator=(const PhysicsBoneSetting& lhs) = delete;
  ~PhysicsBoneSetting();

public:
  float damping;
  float elasticity;
  float stiffness;
  float inert;
  float velocity_scale;
  IVec wave;
  IVec gravity;
  IVec end_offset;
  bool has_end;
  float end_length;
  float wave_time;
  bool has_wave;

private:
};

using PhysicsBoneSettingPtr = std::unique_ptr<PhysicsBoneSetting>;
using PBonePtr = std::unique_ptr<PhysicsBoneSetting>;

} // namespace ifire::game